package com.example.UI.entity;

import java.io.Serializable;

public class User implements Serializable {
    private String name;
    private String class_name;
    private String student_id;
    private String username;
    private String password;

    // 构造方法
    public User(String username, String password, String name, String studentId, String className) {
        this.username = username;
        this.password = password; // 注意：这里应该使用散列密码
        this.name = name;
        this.student_id = studentId;
        this.class_name = className;
    }
    public User(String className, String studentId, String name) {
        this.class_name = className;
        this.student_id = studentId;
        this.name = name;
        this.username = null; // 初始化为null
        this.password = null; // 初始化为null
    }

    private static final long serialVersionUID = 1L;
    // getter和setter方法
    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getClass_name() {
        return class_name;
    }

    public void setClass_name(String class_name) {
        this.class_name = class_name;
    }

    public String getStudent_id() {
        return student_id;
    }

    public void setStudent_id(String student_id) {
        this.student_id = student_id;
    }

    public String getUsername() {
        return username;
    }

    public void setUsername(String username) {
        this.username = username;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    public String getStudentId() {
        return student_id;
    }
}
